//
//  ITDownloaderManager.h
//  InduceTool
//
//  Created by 魏延龙 on 2020/9/10.
//  Copyright © 2020 魏延龙. All rights reserved.
//

#import <Foundation/Foundation.h>
@class ITDownloader;

NS_ASSUME_NONNULL_BEGIN

@interface ITDownloaderManager : NSObject

+ (instancetype)sharedInstance;

- (ITDownloader *)startDownloadWithURLStr:(NSString *)urlstr
                                   toPath:(NSString *)path
                                 progress:(void (^)(uint64_t receivedLength, uint64_t totalLength, NSInteger remainingTime, float progress))progressBlock
                                    error:(void (^)(NSError *error))errorBlock
                                 complete:(void (^)(BOOL downloadFinished, NSString *pathToFile))completeBlock;

- (void)cancleAll;

- (void)cancelWithUrl:(NSString *)urlstr;
@end

NS_ASSUME_NONNULL_END
